package Practice.object;

import java.util.Arrays;

public class SplitDemo {
    public static void main(String[] args) {
        String s = "dsa54dsa55132a1d64s56ad351sa";
        String[] data = s.split("[0-9]+");
        System.out.println(Arrays.toString(data));
        s = "132.135465.13465.13";
        data = s.split("\\.");
        System.out.println(Arrays.toString(data));

        s = ".13.321..132.....";
        data = s.split("\\.");
        System.out.println(Arrays.toString(data));
        System.out.println(data.length);
        //最开始就是可拆分项，那么数组第1个元素为空字符串-----------------""
        //如果连续两个(两个以上)可拆分项，那么中间也会拆出一个空字符串------""
        //如果末尾连续多个可拆分项，那么拆出的空字符串被忽略(不要了)


    }
}
